package chainOfResponsibility.example;

/**
 * 总经理类 (什么事情都可以处理)
 */
public class GeneralManager extends Manager {

    public GeneralManager() {
    }

    public GeneralManager(String name) {
        super(name);
    }

    @Override
    public void requestApplication(Request request) {
        if (request.getRequestType().equals("请假")) {
            System.out.println(request.getRequestContent() + " 数量:" + request.getNumber() + " 被批准");
        } else if (request.getRequestType().equals("加薪") && request.getNumber() <= 500) {
            System.out.println(request.getRequestContent() + " 数量:" + request.getNumber() + " 被批准");
        } else if (request.getRequestType().equals("加薪") && request.getNumber() >= 500) {
            System.out.println(request.getRequestContent() + " 数量:" + request.getNumber() + " 被批准");
        } else {
            System.out.println("暂时先别管,以后都会有的");
        }
    }
}
